<%--
    Document   : index
    Created on : 30/09/2012
    Author     : Vanie Torres

--%>

<%@taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
<%@taglib uri="http://richfaces.org/rich" prefix="rich"%>

<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">
<script type="text/javascript" src="<%=request.getContextPath()%>/js/generic.js"></script>
<link type="text/css" rel="stylesheet" href="<%=request.getContextPath()%>/css/default.css"/>
<f:view><!-- Necesario para que se pueda ver pagina-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Voleyball Strategy</title>
<script type="text/javascript" src="<%=request.getContextPath()%>/js/generic.js"></script>
</head>
<body onload="Richfaces.showModalPanel('modAcceso')">
<script type="text/javascript">
function validarUsuario(validar) {
    if (validar == "true") {
        Richfaces.hideModalPanel('modAcceso');
    }
}
</script>
<table border="0" width="100%" cellpadding="0" cellspacing="0">
<tr>
    <td width="5%" rowspan="4"></td>
    <td width="70%">
        <h:panelGrid id="panMenu" width="100%" cellpadding="0" cellspacing="0">
            <jsp:include page="/principal/menu.jsp"/>
        </h:panelGrid>
    </td>
    <td width="20%" align="left">
        <h:outputLink onclick="loadPageMenu('#{facesContext.externalContext.requestContextPath}/faces/principal/welcome.jsp')">
            <h:graphicImage value="/faces/img/pantalla/logo.png"/>
        </h:outputLink>
    </td>
    <td width="5%" rowspan="4"></td>
</tr>
<tr>
    <td valign="top" colspan="2" width="100%" >
        <hr color="#184890" >
    </td>
</tr>
<tr>
    <td width="100%" colspan="2">
        <iframe id="frameContent" src="<%=request.getContextPath()%>/faces/principal/welcome.jsp"
                width="100%" height="480" scrolling="true" frameborder="0"
                marginheight="0" marginwidth="0" >
        </iframe>
    </td>
</tr>
<tr>
    <td width="100%" bgcolor="#bed6f8" height="30" align="right" colspan="2">
        <label><strong>CopyRight ® 2011 - 2012</strong></label>
    </td>
</tr>
</table>
<%--Inicio: Modal Usuario--%>
<rich:modalPanel id="modAcceso" moveable="true" width="300" height="180">
<f:facet name="header">
    <h:outputText value="Strategy - Acceso"/>
</f:facet>
<a4j:form id="formUsuario">
    <h:panelGrid id="panUsuario" columns="3">
        <h:outputText value="Usuario" styleClass="lblcampotitulo8"/>
        <h:outputText value=": " styleClass="lblcampotitulo8"/>
        <h:inputText value="#{controlAccesoUsuario.usuario}" size="20" maxlength="7" style="text-align:right;" styleClass="txtcontrol8"/>

        <h:outputText value="Contraseña" styleClass="lblcampotitulo8"/>
        <h:outputText value=": " styleClass="lblcampotitulo8"/>
        <h:inputSecret value="#{controlAccesoUsuario.contrasenia}" size="20" maxlength="7" style="text-align:right;" styleClass="txtcontrol8"/>

        <h:panelGrid width="100"></h:panelGrid>
        <h:panelGrid width="10"></h:panelGrid>
    </h:panelGrid>
    <h:panelGrid  width="100%">
        <hr  color="#184890" style="color:navy;">
    </h:panelGrid>
     <br>
    <h:panelGrid columns="2" style="text-align:center;" width="100%">
        <a4j:commandButton id="btnAceptar" value="Aceptar" action="#{controlAccesoUsuario.acceder}"
                           oncomplete="validarUsuario('#{controlAccesoUsuario.validar}')" styleClass="btncontrol120" />
        <a4j:commandButton id="btnCancelar" value="Cancelar" action="#{controlAccesoUsuario.cancelar}"
                           reRender="panUsuario" styleClass="btncontrol120"/>
    </h:panelGrid>

</a4j:form>
</rich:modalPanel>
<%--Fin: Modal Usuario--%>
</body>
</html>
</f:view>
